package com.jnshu.dao;

import com.jnshu.pojo.Collect;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface CollectMapper {
     //后台删除记录表---id
    boolean deleteByPrimaryKey(long courseId);

    //前台收藏
    int insert(Collect record);

    int insertSelective(Collect record);

    Collect selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Collect record);

    int updateByPrimaryKey(Collect record);

    //前台状态
    Collect selectStatus(@Param("userId") long userId, @Param("courseId")long courseId);

    //前台取消收藏
    Boolean deleteStatus(@Param("userId")long userId,@Param("courseId") long courseId);
}
